<?php
/**
 * Description of az_Session
 *
 * @author Shark
 */

ob_start();
session_start();

class az_Session {

    var $SessionName = 'Default';

    /* Function name: Constructor
      Params:
      @SessionName - The session name
     */

    function __constructor($SessionName) {
        $this->SessionName = $SessionName;
    }

    /* Function name: Set
      Params:
      @Setting - The key to set
      @Value - The value to set
     */
    function SetSS($Setting, $Value) {
        $_SESSION[$this->SessionName][$Setting] = $Value;
    }

    /* Function name: Get
      Params:
      @Setting - The key to get
      @Default - Value to return if the requested key is empty.
     */
    function GetSS($Setting, $Default='') {
        if (isset($_SESSION[$this->SessionName][$Setting]) && !empty($_SESSION[$this->SessionName][$Setting]))
            return $_SESSION[$this->SessionName][$Setting];
        else
            return $Default;
    }

}

$session = new az_Session();

?>
